home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
mail.altrad.com
/
2015.02.mail.altrad.com.tar
/
mail.altrad.com
/
TEST
/
office deutch
/
INFOPATH.NL-NL
/
INFLR.CAB
/
ASSETTRA.XSN_1043
/
upgrade.xsl
< prev
next >
Wrap
Extensible Markup Language
|
2006-11-12
|
4KB
|
106 lines
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-21T21:12:27" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" version="1.0">
<xsl:output encoding="UTF-8" method="xml"/>
<xsl:template match="text() | *[namespace-uri()='http://www.w3.org/1999/xhtml']" mode="RichText">
<xsl:copy-of select="."/>
</xsl:template>
<xsl:template match="/">
<xsl:copy-of select="processing-instruction() | comment()"/>
<xsl:choose>
<xsl:when test="my:assetTracking">
<xsl:apply-templates select="my:assetTracking" mode="_0"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="var">
<xsl:element name="my:assetTracking"/>
</xsl:variable>
<xsl:apply-templates select="msxsl:node-set($var)/*" mode="_0"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="my:employee" mode="_1">
<xsl:copy>
<xsl:element name="my:employeeName">
<xsl:copy-of select="my:employeeName/text()[1]"/>
</xsl:element>
<xsl:element name="my:employeeDepartment">
<xsl:copy-of select="my:employeeDepartment/text()[1]"/>
</xsl:element>
</xsl:copy>
</xsl:template>
<xsl:template match="my:asset" mode="_3">
<xsl:copy>
<xsl:element name="my:assetID">
<xsl:copy-of select="my:assetID/text()[1]"/>
</xsl:element>
<xsl:element name="my:assetDescription">
<xsl:copy-of select="my:assetDescription/text()[1]"/>
</xsl:element>
<xsl:element name="my:assetMake">
<xsl:copy-of select="my:assetMake/text()[1]"/>
</xsl:element>
<xsl:element name="my:assetModel">
<xsl:copy-of select="my:assetModel/text()[1]"/>
</xsl:element>
<xsl:element name="my:assetSerialNumber">
<xsl:copy-of select="my:assetSerialNumber/text()[1]"/>
</xsl:element>
<xsl:element name="my:assetAssignedTo">
<xsl:copy-of select="my:assetAssignedTo/text()[1]"/>
</xsl:element>
<xsl:element name="my:assetDepartment">
<xsl:copy-of select="my:assetDepartment/text()[1]"/>
</xsl:element>
<xsl:element name="my:assetLocation">
<xsl:copy-of select="my:assetLocation/text()[1]"/>
</xsl:element>
<xsl:element name="my:assetCategory">
<xsl:copy-of select="my:assetCategory/text()[1]"/>
</xsl:element>
<xsl:element name="my:assetNotes">
<xsl:apply-templates select="my:assetNotes/text() | my:assetNotes/*[namespace-uri()='http://www.w3.org/1999/xhtml']" mode="RichText"/>
</xsl:element>
</xsl:copy>
</xsl:template>
<xsl:template match="my:assets" mode="_2">
<xsl:copy>
<xsl:choose>
<xsl:when test="my:asset">
<xsl:apply-templates select="my:asset" mode="_3"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="var">
<xsl:element name="my:asset"/>
</xsl:variable>
<xsl:apply-templates select="msxsl:node-set($var)/*" mode="_3"/>
</xsl:otherwise>
</xsl:choose>
</xsl:copy>
</xsl:template>
<xsl:template match="my:assetTracking" mode="_0">
<xsl:copy>
<xsl:choose>
<xsl:when test="my:employee">
<xsl:apply-templates select="my:employee[1]" mode="_1"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="var">
<xsl:element name="my:employee"/>
</xsl:variable>
<xsl:apply-templates select="msxsl:node-set($var)/*" mode="_1"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="my:assets">
<xsl:apply-templates select="my:assets[1]" mode="_2"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="var">
<xsl:element name="my:assets"/>
</xsl:variable>
<xsl:apply-templates select="msxsl:node-set($var)/*" mode="_2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>